Move away from ShellGlobal API, which is too tightly coupled to
libcanberra-gtk.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/327
});
this._stream = null;
+ this._volumeCancellable = null;
},
get stream() {
},
_notifyVolumeChange() {
- global.cancel_theme_sound(VOLUME_NOTIFY_ID);
- global.play_theme_sound(VOLUME_NOTIFY_ID,
- 'audio-volume-change',
- _("Volume changed"),
- Clutter.get_current_event ());
+ if (this._volumeCancellable)
+ this._volumeCancellable.cancel();
+
+ this._volumeCancellable = new Gio.Cancellable();
+ let player = global.display.get_sound_player();
+ player.play_from_theme('audio-volume-change',
+ _("Volume changed"),
+ this._volumeCancellable);
},
_updateVolume() {